<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.0.1  (Linux)">
	<META NAME="AUTHOR" CONTENT="Hannu Jokinen">
	<META NAME="CREATED" CONTENT="20021203;14092200">
	<META NAME="CHANGED" CONTENT="20030209;12225500">
	<STYLE>
	<!--
		@page { margin-left: 3.18cm; margin-right: 3.18cm; margin-top: 2.54cm; margin-bottom: 2.54cm }
		TD P { margin-bottom: 0.21cm }
		TD P.western { font-family: "Times", serif }
		P { margin-bottom: 0.21cm }
		P.western { font-family: "Times", serif }
		DD.western { font-family: "Times", serif }
		PRE.western { font-family: "Courier", monospace }
		DT.western { font-family: "Times", serif }
		TH P { margin-bottom: 0.21cm }
		TH P.western { font-family: "Times", serif }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" BGCOLOR="#ffffff">
<H1 ALIGN=CENTER>Aino</H1>
<H2 ALIGN=CENTER>Java Bytecodes to Assembly Language Compiler for the
PIC Processor Family.</H2>
<P CLASS="western" ALIGN=CENTER>Written in Java.</P>
<P CLASS="western" ALIGN=CENTER><BR><BR>
</P>
<TABLE WIDTH=864 BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<COL WIDTH=291>
	<COL WIDTH=573>
	<TR VALIGN=TOP>
		<TD WIDTH=291>
			<P CLASS="western"><IMG SRC="kalevala.jpg" NAME="Graphic1" ALIGN=LEFT WIDTH=275 HEIGHT=135 BORDER=0><BR CLEAR=LEFT><I>Aino
			triptych by Akseli Gallen-Kallela</I></P>
		</TD>
		<TD WIDTH=573>
			<P CLASS="western"><B>Aino?</B></P>
			<P CLASS="western">The first edition of the Kalevala appeared in
			1835, compiled and edited by Elias L&ouml;nnrot on the basis of
			the epic folk poems he had collected in Finland and Karelia. This
			poetic song tradition, sung in an unusual, archaic trochaic
			tetrametre, had been part of the oral tradition among speakers of
			Balto-Finnic languages for two thousand years.</P>
			<P CLASS="western">Aino is a tragical character in Kalevala, girl
			who drowns herself when forced to marry an old man. For furter
			information please visit
			<A HREF="http://www.finlit.fi/kalevala/indexeng.html">http://www.finlit.fi/kalevala/indexeng.html</A></P>
		</TD>
	</TR>
</TABLE>
<P CLASS="western" ALIGN=CENTER><BR><BR>
</P>
<HR>
<H1>Copyright</H1>
<P CLASS="western">Copyright <FONT FACE="Times, serif">&copy;</FONT>
2003 Hannu Jokinen, Finland. Aino is licensed free of charge. There
is no warranty for the program. The program is provided &quot;as is&quot;
without warranty of any kind, either expressed or implied, including,
but not limited to, the implied warranties of merchantability and
fitness for a particular purpose. The entire risk as to the quality
and performance of the program is with you. Should the program prove
defective, you assume the cost of all necessary servicing, repair or
correction.</P>
<HR>
<H1>Overview</H1>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">With
most programming languages, you either compile or interpret a program
so that you can run it on your computer. The Java programming
language is unusual in that a program is both compiled and
interpreted. With the compiler, first you translate a program into an
intermediate language called Java bytecodes -the platform-independent
codes interpreted by the interpreter on the Java platform. The
interpreter parses and runs each Java bytecode instruction on the
computer.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">The
Java Virtual Machine is an abstract computing machine. Like a real
computing machine, it has an instruction set and uses various memory
areas. The Java Virtual Machine knows nothing of the Java programming
language, only of a particular file format, the class file format. A
class file contains Java Virtual Machine instructions (or bytecodes)
and a symbol table, as well as other ancillary information.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">Java
is well suited to code user interfaces and other not time critical
applications. Interpreted language is not suitable for fast servers
or other CPU intencive applications. Most certainly you would not
expect to find anything Java related for microcontrollers.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">Aino
is a compiler that reads Java classes and outputs assembly code for
the PIC processor family assemblers. Aino itself does not support any
specific device but you have to give the required parameters in one
of the class files.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">Next
we look how Aino copes with the standard Java. Many of the Java
features are not supported or the support is restricted. Some things
are made more microcontroller friendly. A short list of unsupported
features:</FONT></P>
<UL>
	<LI><DD CLASS="western">No threads (cooperative kernel available)</DD><LI><DD CLASS="western">
	Only 8 and 16-bit unsigned integers</DD><LI><DD CLASS="western">
	No exception handling</DD><LI><DD CLASS="western">
	Only single dimensional arrays</DD><LI><DD CLASS="western">
	Some code structures are <A HREF="#Problematic Program Structures|outline">forbidden</A></DD><LI><DD CLASS="western">
	No recursion</DD><LI><DD CLASS="western" STYLE="margin-bottom: 0.5cm">
	No standard object libraries supported</DD></UL>
<DD CLASS="western" STYLE="margin-left: 0cm; margin-bottom: 0.5cm">At
the moment an unknown set of the 14 bit PIC devices are supported
(type number starts with 16, e.g. 16F84). 
</DD><HR>
<H1>Usage</H1>
<P CLASS="western">The following instructions are based on the
assumption that you are using Linux and bash shell. Things look very
much the same in the 32-bit DOS if you are using Cygwin.</P>
<H2 STYLE="page-break-before: always">Environment Setup</H2>
<P CLASS="western">Install Java SDK (<A HREF="http://java.sun.com/">http://java.sun.com</A>).
Aino is not version critical.</P>
<P CLASS="western">Install assembler, gpasm will work. It is part of
the gputils package (look at sourceforge).</P>
<P CLASS="western">Install gpsim simulator
(<A HREF="http://www.dattalo.com/gnupic/gpsim.html">http://www.dattalo.com/gnupic/gpsim.html</A>).
It is optional, but very usefull. Also lcd module is nice (use a
search engine for the sources or package). Look at <A HREF="#Notes|outline">Notes</A>
for additional info.</P>
<P CLASS="western">Gunzip and untar the Aino package. You will find
four directories:</P>
<UL>
	<LI><P CLASS="western"><FONT FACE="Courier, monospace">aino</FONT>
	contains all the executable class files.</P>
	<LI><P CLASS="western"><FONT FACE="Courier, monospace">lib</FONT>
	contains Java source files for processors and math libs</P>
	<LI><P CLASS="western"><FONT FACE="Courier, monospace">doc</FONT>
	contains documentation in html format.</P>
	<LI><P CLASS="western"><FONT FACE="Courier, monospace">examples</FONT>
	contains &ndash; surprise &ndash; examples.</P>
</UL>
<P CLASS="western">No not change the name of the aino directory,
since it is also the name of the aino package!</P>
<P CLASS="western">Create a new directory for your project:</P>
<PRE CLASS="western">cd aino-x.x/examples
mkdir my_project
cd my_project</PRE><P CLASS="western">
Set environment variable</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">export CLASSPATH=~/aino-x.x:.:$CLASSPATH</PRE><H2>
<FONT FACE="Times, serif">Creating a Project</FONT></H2>
<H3>Required Files</H3>
<P CLASS="western"><FONT FACE="Times, serif">Copy all the necessary
source or class files in the same directory. You need:</FONT></P>
<UL>
	<LI><P CLASS="western"><FONT FACE="Times, serif">A processor type
	class file (e.g. PIC16F84.class) which describes the processor's
	features. Pick one from the library or make one yourself.</FONT></P>
	<LI><P CLASS="western"><FONT FACE="Times, serif">A class Processor
	java file (Processor.java) which extends the processor class.</FONT></P>
	<LI><P CLASS="western"><FONT FACE="Times, serif">Optionally some
	library class files. For example math routines are in the library.</FONT></P>
	<LI><P CLASS="western"><FONT FACE="Times, serif">Your source files.</FONT></P>
</UL>
<P CLASS="western"><FONT FACE="Times, serif">The directory must not
contain any unnecessary Java files, since Aino will compile
everything it finds in the directory. Hint: do not copy the library
files, but use links:</FONT></P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">ln -s ../../lib/Math.class</PRE><H3>
Class Processor File</H3>
<P CLASS="western">Processor.java file is used to make the change of
the processor type easier. The whole source file follows:</P>
<PRE CLASS="western">public class Processor extends PIC16F84 {
}</PRE><P CLASS="western">
Extend the processor type you are using. All the library classes
extend the Processor class. Although not strictly necessary it is
convenient if your source files also extend the Processor class:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">public class MyProject extends Processor {...</PRE><H3>
Processor Type File</H3>
<P CLASS="western"><FONT FACE="Times, serif">The processor type file
has the following format (pic16f84 used as an example):</FONT></P>
<PRE CLASS="western">public class PIC16F84 {
    // processor's registers (optional)
    static final int _W = 0;
    static final int _F = 1;
    static final int _TMR0 = 1;
    static final int _PCL = 2;
    static final int _STATUS = 3;
    static final int _FSR = 4;
    static final int _PORTA = 5;
    static final int _PORTB = 6;
    static final int _EEDATA = 8;
    static final int _EEADR = 9;
    static final int _PCLATH = 10;
    static final int _INTCON = 11;
    static final int _OPTION = 0x81;
    static final int _TRISA = 0x85;
    static final int _TRISB = 0x86;
    static final int _EECON1 = 0x88;
    static final int _EECON2 = 0x89;

    static final int _C = 0;
    static final int _Z = 2;

    public PIC16F84() {
        _initline(&quot;\tlist\tp=pic16f84, r=dec&quot;);

        _initline(&quot;\torg\t0&quot;);
        _initline(&quot;\tgoto\t_start&quot;);
        _initline(&quot;\torg\t4&quot;);
        _initline(&quot;\tgoto\tinterrupt&quot;);

        _initline(&quot;_STATUS\tequ\t3&quot;);
        _initline(&quot;_C\tequ\t0&quot;);
        _initline(&quot;_Z\tequ\t2&quot;);
        _initline(&quot;_PCL\tequ\t2&quot;);
        _initline(&quot;_PCLATH\tequ\t10&quot;);
        _initline(&quot;_TMR0\tequ\t1&quot;);
        _initline(&quot;_INTCON\tequ\t11&quot;);
        _initline(&quot;_OPTION\tequ\t129&quot;);

        _memory(0x0c, 0x4f);
        _heap(0x4f);
        _banksize(128);
    }

    static void _setMemory(int address, int value) {
    }
    static int _getMemory(int address) {
        return 0;
    }

    static void _asm(String s) {
    }

    static void _initline(String line) {
    }
    static void _clock(int speed) {
    }
    static void _heap(int address) {
    }
    static void _memory(int start, int stop) {
    }
    static void _banksize(int len) {
    }
}</PRE><P CLASS="western">
The static final declarations are not absolutely necessary, but
usefull if you want to read or modify the memory. And that is exactly
what you want to do.</P>
<P CLASS="western">There are a few predefined functions, which do not
create any real code, but are used to describe the processor's
properties:</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static void
_clock(int speed)</FONT>: define the processor's speed in Hz. Used by
timers and delays.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static void
_heap(int address)</FONT>: the last address of one of the memory
banks. That bank is used for objects and arrays. Heap address must be
less than 256.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static void
_memory(int start, int stop)</FONT>: usable memory for the variables.
You can have many of these depending on the number of banks in the
processor or if you want to leave space for the heap in middle of the
memory.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static void
_banksize(int len)</FONT>: size of memory bank.</P>
<P CLASS="western">You have to call all the functions somewhere.</P>
<P CLASS="western">There are predefined functions which create code:</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static void
_asm(String line)</FONT>: creates one line of asm code.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static void
_initline(String line)</FONT>: same as the _asm(), but the code is
generated in the begining of the asm file. Used for initialisation.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static int
_getMemory(int address)</FONT>: reads one byte from the memory. No
unnecessary functions calls generated.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static void
_setMemory(int address, int value)</FONT>: writes one byte to the
memory. No unnecessary functions calls generated.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static void
_setBit(int address, int bit)</FONT>: sets the bit number <FONT FACE="Courier, monospace">bit</FONT>
at the memory address <FONT FACE="Courier, monospace">address</FONT>.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static void
_clearBit(int address, int bit)</FONT>: clears the bit number <FONT FACE="Courier, monospace">bit</FONT>
at the memory address <FONT FACE="Courier, monospace">address</FONT>.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">static void
_delay(int microseconds)</FONT>: generates quite accurate online
delay code. Maximum delay depends on the clock speed.</P>
<P CLASS="western">You have to write the init code for the processor
(or find a suitable file in the lib directory). At least the
following lines must exists (for the pic16f84, other processors might
have other requirements):</P>
<PRE CLASS="western" STYLE="margin-left: 2cm">// Tell the processor type and the default number base.
// Number base must be dec!
_initline(&quot;\tlist\tp=pic16f84a, r=dec&quot;);
// Processor's init vectors
_initline(&quot;\torg\t0&quot;);
_initline(&quot;\tgoto\t_start&quot;);
_initline(&quot;\torg\t4&quot;);
_initline(&quot;\tgoto\tinterrupt&quot;);
// Important labels used by the compiler
_initline(&quot;_STATUS\tequ\t3&quot;);
_initline(&quot;_C\tequ\t0&quot;);
_initline(&quot;_Z\tequ\t2&quot;);
_initline(&quot;_PCL\tequ\t2&quot;);
_initline(&quot;_PCLATH\tequ\t10&quot;);
_initline(&quot;_TMR0\tequ\t1&quot;);
_initline(&quot;_INTCON\tequ\t11&quot;);
_initline(&quot;_OPTION\tequ\t129&quot;);</PRE><H3>
Compilation</H3>
<P CLASS="western">Now you should have at least two source files in
the work directory (MyProject.java, Processor.java) and the processor
type class file (e.g. PIC16F84.class). If you need library classes
copy (or make link) those also in the working directory. 
</P>
<P CLASS="western">Create class files:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">$ javac *.java</PRE><P CLASS="western">
Create asm files:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">$ java aino.Aino</PRE><P CLASS="western">
Aino reads all the class files and starts to compile. If you are
using Java language inner classes there will be more class files that
there were Java files.</P>
<P CLASS="western">Depending on your environment it should be
possible to combine the two steps:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">$ java aino.Aino *.java</PRE><P CLASS="western">
Aino will generate an asm file which has the same name than the Java
class file where the main() function was declared. If you need an asm
file with DOS style newlines call Aino with an option -crlf:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">$ java aino.Aino -crlf</PRE><P CLASS="western">
Create the hex file:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">$ gpasm MyProject.asm</PRE><P CLASS="western">
It is a good idea to run the code in the simulator. Start it:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">$ gpsim</PRE><P CLASS="western">
You can use GUI together with a command line interface. Type the
following lines in the text window.</P>
<P CLASS="western">Define the processor type:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">gpsim&gt; processor p16f84</PRE><P CLASS="western">
Load the hex file or cod file (cod file contains symbolic
information):</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">gpsim&gt; load s MyProject.cod</PRE><P CLASS="western">
Set a break point. If the test program ends to an eternal loop you
can just run a big number of CPU cycles:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">gpsim&gt; break -c 10000</PRE><P CLASS="western">
Run 10000 CPU cycles:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">gpsim&gt; run</PRE><P CLASS="western">
Dump the pocessor's memory space:</P>
<PRE CLASS="western" STYLE="margin-bottom: 0.5cm">gpsim&gt; dump</PRE><P CLASS="western">
gpsim documentation explains how to create a more compilacated
simulation environment.</P>
<HR>
<H1>Compiler Implementation</H1>
<H2>Types and Values in the Standard Java</H2>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">Java
is a strongly typed language, which means that every variable and
every expression has a type that is known at compile time. The types
of the Java language are divided into two categories: primitive types
and reference types. Corresponding to the primitive types and
reference types, there are two categories of data values that can be
stored in variables, passed as arguments, returned by methods, and
operated upon: primitive values and reference values.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">The
primitive types are the boolean type, the integral types, and the
floating-point types. The integral types are byte, short, int, and
long, whose values are 8-bit, 16-bit, 32-bit, and 64-bit signed
two's-complement integers, respectively, and char, whose values are
16-bit unsigned integers representing Unicode characters.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">The
floating-point types are float, whose values are 32-bit
floating-point numbers, and double, whose values are 64-bit
floating-point numbers.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">The
boolean type has the truth values true and false.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">There
are three kinds of reference types: the class types, the interface
types, and the array types. An object is a dynamically created class
instance or an array. The reference values are pointers to these
objects and a special null reference, which refers to no object.</FONT></P>
<H2>Primitive Types in Aino</H2>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">The
Java Virtual Machine defines an abstract notion of a word that has a
platform-specific size. A word is large enough to hold a value of
type byte, char, short, int, float, reference, or returnAddress, or
to hold a native pointer. Two words are large enough to hold values
of the larger types, long and double. In practise the word must be 32
bits long. Even a boolean value takes 32 bits in a typical virtual
machine implementation.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">It
is not a very good idea to use at least 32 bits for every variable in
the microcontroller environment. Thus Aino defines word differently:
it is only 8 bits. Using a special trick the boolean value can use
only one bit. The following table summarizes the types supported by
Aino:</FONT></P>
<TABLE WIDTH=654 BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=133>
	<COL WIDTH=85>
	<COL WIDTH=109>
	<COL WIDTH=64>
	<COL WIDTH=87>
	<COL WIDTH=105>
	<THEAD>
		<TR VALIGN=TOP>
			<TH WIDTH=133>
				<P CLASS="western">Type</P>
			</TH>
			<TH WIDTH=85>
				<P CLASS="western">Supported</P>
			</TH>
			<TH WIDTH=109>
				<P CLASS="western">Java size</P>
			</TH>
			<TH WIDTH=64>
				<P CLASS="western">VM size</P>
			</TH>
			<TH WIDTH=87>
				<P CLASS="western">Aino size</P>
			</TH>
			<TH WIDTH=105>
				<P CLASS="western">Values</P>
			</TH>
		</TR>
	</THEAD>
	<TBODY>
		<TR>
			<TD WIDTH=133 VALIGN=TOP>
				<P CLASS="western">boolean<SUP>1</SUP></P>
			</TD>
			<TD WIDTH=85 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>yes</P>
			</TD>
			<TD WIDTH=109 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER><BR>
				</P>
			</TD>
			<TD WIDTH=64 VALIGN=BOTTOM SDVAL="32" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>32</P>
			</TD>
			<TD WIDTH=87 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>8 or 1</P>
			</TD>
			<TD WIDTH=105 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>0 or non-zero</P>
			</TD>
		</TR>
		<TR>
			<TD WIDTH=133 VALIGN=TOP>
				<P CLASS="western">byte<SUP>2</SUP></P>
			</TD>
			<TD WIDTH=85 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>yes</P>
			</TD>
			<TD WIDTH=109 VALIGN=BOTTOM SDVAL="8" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>8</P>
			</TD>
			<TD WIDTH=64 VALIGN=BOTTOM SDVAL="32" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>32</P>
			</TD>
			<TD WIDTH=87 VALIGN=BOTTOM SDVAL="8" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>8</P>
			</TD>
			<TD WIDTH=105 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>0...255</P>
			</TD>
		</TR>
		<TR>
			<TD WIDTH=133 VALIGN=TOP>
				<P CLASS="western">short</P>
			</TD>
			<TD WIDTH=85 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>yes</P>
			</TD>
			<TD WIDTH=109 VALIGN=BOTTOM SDVAL="16" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>16</P>
			</TD>
			<TD WIDTH=64 VALIGN=BOTTOM SDVAL="32" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>32</P>
			</TD>
			<TD WIDTH=87 VALIGN=BOTTOM SDVAL="8" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>8</P>
			</TD>
			<TD WIDTH=105 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>0...255</P>
			</TD>
		</TR>
		<TR>
			<TD WIDTH=133 VALIGN=TOP>
				<P CLASS="western">int</P>
			</TD>
			<TD WIDTH=85 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>yes</P>
			</TD>
			<TD WIDTH=109 VALIGN=BOTTOM SDVAL="32" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>32</P>
			</TD>
			<TD WIDTH=64 VALIGN=BOTTOM SDVAL="32" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>32</P>
			</TD>
			<TD WIDTH=87 VALIGN=BOTTOM SDVAL="8" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>8</P>
			</TD>
			<TD WIDTH=105 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>0...255</P>
			</TD>
		</TR>
		<TR>
			<TD WIDTH=133 VALIGN=TOP>
				<P CLASS="western">long</P>
			</TD>
			<TD WIDTH=85 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>yes</P>
			</TD>
			<TD WIDTH=109 VALIGN=BOTTOM SDVAL="64" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>64</P>
			</TD>
			<TD WIDTH=64 VALIGN=BOTTOM SDVAL="64" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>64</P>
			</TD>
			<TD WIDTH=87 VALIGN=BOTTOM SDVAL="16" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>16</P>
			</TD>
			<TD WIDTH=105 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>0...65535</P>
			</TD>
		</TR>
		<TR>
			<TD WIDTH=133 VALIGN=TOP>
				<P CLASS="western">char<SUP>3</SUP></P>
			</TD>
			<TD WIDTH=85 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>yes</P>
			</TD>
			<TD WIDTH=109 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>16 bit Unicode</P>
			</TD>
			<TD WIDTH=64 VALIGN=BOTTOM SDVAL="32" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>32</P>
			</TD>
			<TD WIDTH=87 VALIGN=BOTTOM SDVAL="8" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>8</P>
			</TD>
			<TD WIDTH=105 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>0...255</P>
			</TD>
		</TR>
		<TR>
			<TD WIDTH=133 VALIGN=TOP>
				<P CLASS="western">float</P>
			</TD>
			<TD WIDTH=85 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>no</P>
			</TD>
			<TD WIDTH=109 VALIGN=BOTTOM SDVAL="32" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>32</P>
			</TD>
			<TD WIDTH=64 VALIGN=BOTTOM SDVAL="32" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>32</P>
			</TD>
			<TD WIDTH=87 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER><BR>
				</P>
			</TD>
			<TD WIDTH=105 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER><BR>
				</P>
			</TD>
		</TR>
		<TR>
			<TD WIDTH=133 VALIGN=TOP>
				<P CLASS="western">double</P>
			</TD>
			<TD WIDTH=85 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER>no</P>
			</TD>
			<TD WIDTH=109 VALIGN=BOTTOM SDVAL="64" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>64</P>
			</TD>
			<TD WIDTH=64 VALIGN=BOTTOM SDVAL="64" SDNUM="1033;">
				<P CLASS="western" ALIGN=CENTER>64</P>
			</TD>
			<TD WIDTH=87 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER><BR>
				</P>
			</TD>
			<TD WIDTH=105 VALIGN=TOP>
				<P CLASS="western" ALIGN=CENTER><BR>
				</P>
			</TD>
		</TR>
	</TBODY>
</TABLE>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif"><SUP>1</SUP>
Boolean arrays whose size is 8 use only one byte alltogether.<BR><SUP>2</SUP>
Byte arrays are equal to boolean arrays for the virtual machine. Thus
byte arrays are not allowed. Use char arrays instead.<BR><SUP>3</SUP>
For Aino char is just a byte, no Unicode supported.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">Although
in the Java the integral types are signed Aino treats them unsigned.</FONT></P>
<H2>Reference Types in Aino</H2>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">Reference
is a pointer to the location of an object instance. Since Aino word
is 8 bits long only the first 256 bytes can hold an object. Locate
the heap below address 256! Be careful with the objects: there are no
garbage collection in Aino! All the objects hold the allocated memory
for ever!</FONT></P>
<H2>Variables</H2>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">A
variable is a storage location. It has an associated type that is
either a primitive type or a reference type. A variable of a
primitive type always holds a value of that exact primitive type. A
variable of reference type can hold either a null reference or a
reference to any object whose class is assignment compatible with the
type of the variable.</FONT></P>
<DL>
	<DT CLASS="western">There are seven kinds of variables:</DT><DD CLASS="western">
	1. A class variable is a field of a class type declared using the
	keyword static within a class declaration.</DD><DD CLASS="western">
	2. An instance variable is a field declared within a class
	declaration without using the keyword static.</DD><DD CLASS="western">
	3. Array components are unnamed variables that are created whenever
	a new object that is an array is created. Although Aino supports
	only single dimensional arrays, very complicated data structures are
	possible since the array components can be objects which themselves
	can hold arrays.</DD><DD CLASS="western">
	4. Method parameters name argument values passed to a method. For
	every parameter declared in a method declaration, the parameter's
	value is copied on the methods's local parameter variable each time
	that method is invoked.</DD><DD CLASS="western">
	5. Constructor parameters name argument values passed to a
	constructor. For every parameter declared in a constructor
	declaration, the parameter's value is copied on the constructor's
	local parameter variable each time a class instance creation
	expression or explicit constructor invocation is evaluated.</DD><DD CLASS="western">
	6. Exception-handler parameter variables are not supported by Aino.</DD><DD CLASS="western" STYLE="margin-bottom: 0.5cm">
	7. Local variables are declared by local variable declaration
	statements.</DD></DL>
<H2>
Memory Usage of Aino</H2>
<P CLASS="western">Memory is divided in the following parts (PIC16F84
as an example):</P>
<P CLASS="western"><IMG SRC="Aino_html_mfb7a257.gif" NAME="Graphic4" ALIGN=LEFT WIDTH=192 HEIGHT=493 BORDER=0><BR CLEAR=LEFT><BR><BR>
</P>
<H3>Memory Reserved by the Compiler</H3>
<P CLASS="western">Aino needs six bytes of memory to run the code:</P>
<DL>
	<DD CLASS="western">_ACC is the accumulator for the 16-bit variables
	upper byte.</DD><DD CLASS="western">
	_HEAP points to the last used byte of the heap.</DD><DD CLASS="western" STYLE="margin-bottom: 0.5cm">
	_ACC_TEMP, _STATUS_TEMP, _FSR_TEMP, and _W_TEMP are used to save
	data during an interrupt.</DD></DL>
<H3>
Memory Reuse</H3>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">Aino
has no stack. All the variables are statically placed in the memory
space. It does not mean the memory is waisted. Aino can share the
same memory area between several functions if they do not call each
others. Example code:</FONT></P>
<PRE CLASS="western">    void func1(int a) {
        int b;
        int c;
    }

    void func2(int d, int e) {
        int f, g;
    }

    public static void main() {
        Foo foo = new Foo();
        foo.func1(1);
        foo.func2(2, 3);
    }</PRE><P CLASS="western" STYLE="margin-bottom: 0cm">
<BR>
</P>
<P CLASS="western" STYLE="margin-bottom: 0cm">We can see that <CODE><FONT FACE="Courier, monospace">main</FONT></CODE>
calls <CODE><FONT FACE="Courier, monospace">func1</FONT></CODE> and
<CODE><FONT FACE="Courier, monospace">func2</FONT></CODE>, but <CODE><FONT FACE="Courier, monospace">func1</FONT></CODE>
does not call <CODE><FONT FACE="Courier, monospace">func2</FONT></CODE>.
Thus Aino arranges the local variables in the following way:</P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><IMG SRC="Aino_html_ma41bb93.gif" NAME="Graphic3" ALIGN=LEFT WIDTH=308 HEIGHT=251 BORDER=0><BR CLEAR=LEFT><FONT FACE="Times, serif">There
are totally 8 (10) variables, which occupy only 6 bytes from the
memory, since func1 and func2 can reuse the same space. Instance
pointer (<FONT FACE="Courier, monospace">this</FONT>) is used by all
the non-static functions. It defines the object where the operations
should apply.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><FONT FACE="Times, serif">Aino
needs six bytes of memory for its internal use. Rest of the memory is
divided between static variables and the heap. Heap contains all the
objects and arrays. The following example illustrates the memory
usage:</FONT></P>
<PRE CLASS="western">public class Foo extends Processor {
    static int staticVar1 = 0x77;
    static long staticVar2;
    int instanceVar1;
    long instanceVar2;

    public int increment(int i) {
        int a;
        a = i + 1;
        return a;
    }

    public static void main() {
        Foo foo1 = new Foo();
        Foo foo2 = new Foo();

        staticVar2 = 0x1234;
        foo1.instanceVar1 = foo1.increment(0x32);
        foo1.instanceVar2 = 0x5678;
        foo2.instanceVar1 = 0x44;
        foo2.instanceVar2 = 0x6789;

        for (;;) ;
    }
}</PRE><P CLASS="western">
The memory map of the processor is illustrated in the following
picture. It is a screen snapshot after simulation has finished in the
gpsim. Memory locations starting from 0x0c are reserved for Aino's
internal use. Class variables are in addresses 0x12- 0x14. Next there
are five bytes for the method <FONT FACE="Courier, monospace">increment</FONT>.
Two of the bytes are for temporary variables. They are required for
provisional results etc. Required extra space is estimated by the
Java compiler and the information is included in the class file.
Typically the temporary space is reused and thus it is not a big
loss. Method main uses three bytes. 
</P>
<P CLASS="western">_HEAP is initialized to point to address 0x4e.
After the first 'new' command the _HEAP points to address 0x4c and
after the second class Foo instantiation it points to the address
0x49.</P>
<P CLASS="western"><BR><BR>
</P>
<P CLASS="western" STYLE="margin-bottom: 0cm"><IMG SRC="Aino_html_m6ed17e9a.gif" NAME="Graphic2" ALIGN=LEFT WIDTH=678 HEIGHT=494 BORDER=0><BR CLEAR=LEFT><BR>
</P>
<H1>Coding Practices</H1>
<H2>Main</H2>
<P CLASS="western">You need at least one method:</P>
<PRE CLASS="western">public static void main()</PRE><P CLASS="western">
That is called after a few initializations. 
</P>
<H2>Interrupts</H2>
<P CLASS="western">You can have interrupt methods. Inside any class
write a method</P>
<PRE CLASS="western">public void interrupt()</PRE><P CLASS="western">
You may have several of those as far as they are in different
classes. Aino will create code which calls all of those whenever an
interrupt occurs. You have to check which interrupt was activated and
reset the relevant bit youself. Be careful when calling other
functions from the interrupt routine: some data of the called method
may be corrupted! Aino reuses memory based on the visible method call
chains, but calls from an interrupt fools the logic. To be on the
safe side: do not call any methods which are called by any other
method.</P>
<H2>Integers &gt; 255</H2>
<P CLASS="western">Aino supports 8 bits long (int) and 16 bits long
(long) unsigned integers. These are scaled down from the original 32
and 64 bits long Java types. It means that Java compiler is happy if
you assign a value &gt;255 to an integer variable:</P>
<PRE CLASS="western">int a = 1000; // ok by javac</PRE><P CLASS="western">
Since Aino's integer is only 8 bits long this would not work. If you
use values &gt; 255 you have to explicitly make them long values. Do
not forget the 'L' in the end of a long constant!</P>
<PRE CLASS="western">long a = 1000L; // ok by Aino, too</PRE><H2>
Boolean array</H2>
<P CLASS="western">To save space it is possible to use only one bit
for a boolean variable. The following code line declares a boolean
array:</P>
<PRE CLASS="western">boolean[] boolArray;</PRE><P CLASS="western">
Normally boolArray would be a pointer to the array allocated from the
heap:</P>
<PRE CLASS="western">boolArray = new boolean[8];</PRE><P CLASS="western">
Aino treats boolean arrays differently. boolArray itself contains the
data bits. You can use boolArray without allocating any space for it,
but the size of the array must be less or equal to eight! Also the
index must be a constant integer.</P>
<PRE CLASS="western">static boolean[] boolArray;
final static int buttonPushed = 0;
final static int doorOpen = 1;
final static int lightsOn = 2;
public static void main() {
    if (button()) {
        boolArray[buttonPushed] = true;
        if (boolArray[doorOpen] &amp;&amp; boolArray[lightsOn])
        ...</PRE><P CLASS="western">
<BR><BR>
</P>
<H2><A NAME="Problematic Program Structures|outline"></A>Problematic
Program Structures</H2>
<H3>a = b&gt;0 ? 1 : 2</H3>
<P CLASS="western">How can such a simple line of code be so
problematic? It is because Aino cannot see the original source code
but the compiled classes. They have instructions for the virtual
machine which executes the code online. Look at the pseudocode for
the header example:</P>
<PRE CLASS="western">    if b &gt; 0 goto label1
    push constant 2 to stack
    goto label2
label1: 
    push constant 1 to stack
label2:
    a := pop stack</PRE><P CLASS="western">
For an interpreter the code is a piece of cake. For a compiler the
situation is more difficult: at compile time it is not possible to
know which constant will be pushed to the stack. Since Aino compiles
instructions one at a time without seeing the big picture the result
will not work. Use simpler code structures instead:</P>
<PRE CLASS="western">if (b &gt; 0) a = 1;
else a = 2;</PRE><P CLASS="western">
<BR><BR>
</P>
<HR>
<H1>Libraries</H1>
<H2>Special Classes</H2>
<P CLASS="western">Aino does not support the standard Java platform
package classes (for obvious reasons). However, some classes are
partly supported.</P>
<H3>String</H3>
<P CLASS="western">Only final (constant) Strings are supported, e.g.:</P>
<PRE CLASS="western" STYLE="margin-left: 2cm">public class Test {
    static final String str = &ldquo;Hello, world!&rdquo;;
    void foo() {
        char ch = str.charAt(3);
        ...</PRE><P CLASS="western">
or</P>
<PRE CLASS="western" STYLE="margin-left: 2cm; margin-bottom: 0.5cm">char ch = &ldquo;Hello, wordl!&rdquo;.charAt(3);</PRE><P CLASS="western">
The string is coded in the program memory. Equal strings are coded
only once, even if they are defined in different files. <FONT FACE="Courier, monospace">toCharArray</FONT>
method generates always new code.</P>
<P CLASS="western">The following methods are supported:</P>
<P CLASS="western" STYLE="margin-left: 2cm"><FONT FACE="Courier, sans-serif">int
length()</FONT> returns the length of this string. Value is known at
the compile time and no real code is generated.</P>
<P CLASS="western" STYLE="margin-left: 2cm"><FONT FACE="Courier, sans-serif">char
charAt(int index)</FONT> returns the character at the specified
index. Generates &ldquo;fool proof&rdquo; code.</P>
<P CLASS="western" STYLE="margin-left: 2cm"><FONT FACE="Courier, monospace">char[]
toCharArray</FONT> converts this string to a new character array.</P>
<H2>Library Classes</H2>
<P CLASS="western">There are a few library classes provided with the
Aino compiler. The most important class is Task.</P>
<H3>Task</H3>
<P CLASS="western">Task is not an independent class but requires some
built in support from the Aino compiler. It is a cooperative kernel,
which can be used instead of threads. The constructor is:</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public Task(String
function_name)</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">The constructor creates a
new task. The name must have the format <FONT FACE="Courier, monospace">&ldquo;class.method&rdquo;</FONT>.
The method must be of type <FONT FACE="Courier, monospace">static
void</FONT>.</P>
<P CLASS="western">The methods are:</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public static void
run()</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Starts the kernel.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public static void
sleep(int time)</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Suspends the task for
<FONT FACE="Courier, monospace">time</FONT> milliseconds and starts
the next task.</P>
<P CLASS="western">It is not possible to access the program counter
stack of the PIC processor. Thus you can call the <FONT FACE="Courier, monospace">sleep()
</FONT>only on the main level of the task. Example:</P>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=128*>
	<COL WIDTH=128*>
	<THEAD>
		<TR VALIGN=TOP>
			<TH WIDTH=50%>
				<P CLASS="western">Right</P>
			</TH>
			<TH WIDTH=50%>
				<P CLASS="western">Wrong</P>
			</TH>
		</TR>
	</THEAD>
	<TBODY>
		<TR VALIGN=TOP>
			<TD WIDTH=50%>
				<PRE CLASS="western">public static void main() {
    new Task(&ldquo;className.task1&rdquo;);
    new Task(&ldquo;className.task2&rdquo;);
    Task.run();
}
void task1() {
    while (!button_pressed()) 
        sleep(10); // inside task1 body
    ledOn();
    ...</PRE>
			</TD>
			<TD WIDTH=50%>
				<PRE CLASS="western">public static void main() {
    new Task(&ldquo;className.task1&rdquo;);
    new Task(&ldquo;className.task2&rdquo;);
    Task.run();
}
void wait_button() {
    while (!button_pressed()) 
        sleep(10); // NOT INSIDE TASK1
}
void task1() {
    wait_button();
    ledOn();
    ...</PRE>
			</TD>
		</TR>
	</TBODY>
</TABLE>
<P CLASS="western"><BR><BR>
</P>
<H3>Math16</H3>
<P CLASS="western">Math16 library contains routines for 16 bit
multiplication and division. These routines are called automatically
whenever 8 bit or 16 bit multiplication, division or modulus
arithmetic is encountered. The functions are in the library so you
can enhance the code if necessary.</P>
<H3>Lcd</H3>
<P CLASS="western" STYLE="line-height: 100%">Lcd library writes text
on the 'industrial standard' Hitachi LCD display. Constructor accepts
the used port address and the associated control address. The
constructor:</P>
<P CLASS="western" STYLE="line-height: 100%"><FONT FACE="Courier, monospace">public
Lcd(int port, int tris)</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm; line-height: 100%">Port
defines address of the used port. Tris is the associated control
address.</P>
<P CLASS="western" STYLE="line-height: 100%">The methods:</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public void
clear()</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Clears the display.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public void
line2()</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Moves cursor to the
beginning of the second line.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public void
sendChar(int ch)</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Sends one character to
the display.</P>
<H3>StringBuffer</H3>
<P CLASS="western">Use StringBuffer instead of String. It is intended
for composing a line of ASCII text. The constructor:</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public
StringBuffer(int length)</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Length defines the
maximum size of the buffer. The space is allocated from the heap.</P>
<P CLASS="western">The methods:</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public int
length()</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Returns the allocated
length of the buffer.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public int
strlen()</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Returns the current
length of the buffer.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public void
clear()</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Resets current length to
zero.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public int
charAt(int position)</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Returns character at the
buffer position.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public void
append(int i)</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Converts integer value to
ASCII string and appends it to the end of the buffer.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public void
append(long ii)</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Converts long value to
ASCII string and appends it to the end of the buffer.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public void
append(char c)</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Converts character value
to ASCII string and appends it to the end of the buffer.</P>
<P CLASS="western"><FONT FACE="Courier, monospace">public void
append(String s)</FONT></P>
<P CLASS="western" STYLE="margin-left: 2cm">Appends String to the end
of the buffer.</P>
<HR>
<H1>Examples</H1>
<P CLASS="western">A few examples are provided. To build an example
run the 'make' command. To simulate the result run command 'make
sim'.</P>
<H2>Lcd</H2>
<P CLASS="western">xxxx to be completed...</P>
<H2>Math</H2>
<H2>Task</H2>
<H2>StringBuffer</H2>
<HR>
<H1><A NAME="Notes|outline"></A>Notes</H1>
<H2>gpsim</H2>
<P CLASS="western">There might be compilation problems. If the
compiler complains about 'string', 'list' or 'hex' add the following
lines in the relevant files:</P>
<PRE CLASS="western">#include &lt;string&gt;
using std::string;
#include &lt;list&gt;
using std::list;
#include &lt;iomanip&gt;</PRE><P CLASS="western">
Hint: Add lines to the end of the generated file 'config.h' between
directives #if 1/#endif. Run make and when the compilation stops to
an error replace #if 1 with #if 0 and continue the make process. You
may need to enable the lines again.</P>
<P CLASS="western">There might be complaints like</P>
<PRE CLASS="western">14bit-tmrs.cc:936: default argument given for parameter 1 of `void TMR2::update(int = TMR2_DONTCARE_UPDATE)'
14bit-tmrs.h:552: after previous specification in `void TMR2::update(int = TMR2_DONTCARE_UPDATE)'</PRE><P CLASS="western">
Remove the default value from the cc-file (result is <FONT FACE="Courier, monospace">void
TMR2::update(int)</FONT>) to make the compiler happy.</P>
<P CLASS="western">Linker may complain about -lfl. Remove the library
from link line in the Makefile. Write the code 
</P>
<PRE CLASS="western">int yywrap() { return 1; }</PRE><P CLASS="western">
in a proper place inside <FONT FACE="Courier, monospace">extern &ldquo;C&rdquo;
{ }</FONT>.</P>
<P CLASS="western">The previous instructions may also help to compile
the lcd simulation module.</P>
<P CLASS="western"><BR><BR>
</P>
<H1><BR><BR>
</H1>
<HR>
<H1>History</H1>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=43*>
	<COL WIDTH=23*>
	<COL WIDTH=191*>
	<THEAD>
		<TR VALIGN=TOP>
			<TH WIDTH=17%>
				<P CLASS="western">Date</P>
			</TH>
			<TH WIDTH=9%>
				<P CLASS="western">Aino version</P>
			</TH>
			<TH WIDTH=74%>
				<P CLASS="western">Comment</P>
			</TH>
		</TR>
	</THEAD>
	<TBODY>
		<TR VALIGN=TOP>
			<TD WIDTH=17%>
				<P CLASS="western" ALIGN=LEFT>February 9, 2003</P>
			</TD>
			<TD WIDTH=9%>
				<P CLASS="western">0.1.1</P>
			</TD>
			<TD WIDTH=74%>
				<P CLASS="western">Bugs corrected:<BR>- shifting long int with
				0<BR>- unnecessary pagesel directive generation removed</P>
				<P CLASS="western">Documentation update</P>
			</TD>
		</TR>
		<TR VALIGN=TOP>
			<TD WIDTH=17%>
				<P CLASS="western">February 1, 2003</P>
			</TD>
			<TD WIDTH=9%>
				<P CLASS="western">0.1</P>
			</TD>
			<TD WIDTH=74%>
				<P CLASS="western">Initial version.</P>
			</TD>
		</TR>
	</TBODY>
</TABLE>
<P CLASS="western"><BR><BR>
</P>
</BODY>
</HTML>